package cn.java.exercises;

public class Operator
{

    public static void main(String[] args)
    {
        int x=10;
        System.out.println("(++x)+(x++)="+((++x)+(x++))+",x="+x);

        x=1+(2/3)+(int)(-7.6/6.5);
        System.out.println("x="+x);

        System.out.println("10&11|12="+(10&11|12));
        System.out.println("12>>2="+(12>>2));
        System.out.println("(false^true)&&false="+((false^true)&&false));

        double y=0.1;
        double z=1.0;
        y+=0.1+z;
        System.out.println("y="+y);

        System.out.println("---------------------------");
        double subTotal=0,total=0;
        subTotal=2*25.5+1*5.99+2*11;
        total+=subTotal;
        System.out.println("张红梅，消费"+subTotal+"元");
        subTotal=(1*69+2*1.8+2*34.8)*0.9;
        total+=subTotal;
        System.out.println("刘易手，消费"+subTotal+"元");
        subTotal=999+3*68.5;
        total+=subTotal;
        System.out.println("付哲仁，消费"+subTotal+"元");
        System.out.println("三人消费总额："+total+"元");

        System.out.println("---------------------");
        System.out.println("100/(99-49)*2="+100/(99-49)*2);
        System.out.println("99-49/7*3="+(99-49/7*3));

        int aTotal=12;
        double dTotal=10;
        float  fTotal=(float)15.5;
        fTotal=(float)(dTotal*1.2)+aTotal+(float) (fTotal*0.3);
        System.out.println("fTotal="+fTotal);
    }
}
